<?php
/* 日志类
** 放在页面最后、加载模板语句之前
*/
class Log
{
	//文章动作日志
	static function logs_articles($category_id, $status, $title_id='', $title=''){
		$oss_db = new DB();
		$uid = Sessions::get('uid');
		$created = time();
		
		$logs_data=array('uid'=>intval($uid),
						'category_id'=>intval($category_id),
						'status'=>intval($status),
						'title_id'=>$title_id,
						'title'=>h($title),
						'created'=>$created,
						'updated'=>$created,
						);
		$oss_db->table('logs_articles')->insert($logs_data)->run();
	}
}